PATH  Mac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Icon Services and Utilities
>
Obtaining and Using Icons With Icon Services

   

GetIconRefVariant

Specifies a transformation for a given IconRef .

pascal IconRef GetIconRefVariant(
                     IconRefinIconRef,
                     OSTypeinVariant,
                     IconTransformType*outTransform)

inIconRef
A value of type IconRef to be tested.

inVariant
A four-character value of type OSType . You specify a variant by passing one of the constants defined by the enumeration described in Icon Services Data Types . These constants are as follows: kTileIconVariant specifies a tiled icon. kRolloverIconVariant specifies a rollover icon. kDropIconVariant specifies a drop target icon. kOpenIconVariant specifies an open icon. kOpenDropIconVariant specifies a open drop target icon.

outTransform
A pointer to a value of type IconTransformType. On completion, this points to a transformation type that you pass to the function PlotIconRef for purposes of hit-testing.

function result
This function returns an IconRef value that that you pass to the function PlotIconRef for purposes of hit-testing.
DISCUSSION
Icon variants give you a simple way to indicate a temporary change of state by changing an icon's appearance. For example, if you specify the kDropIconVariant value when the user drags over a valid drop target, the GetIconVariant function provides the appropriate data for you to plot the variant with the function PlotIconRef.


© 1999 Apple Computer, Inc. – (Last Updated 03 Dec 99)